package com.topisv.tms.entity.edb;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.persistence.Version;

import org.apache.commons.lang3.builder.ToStringBuilder;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.topisv.tms.entity.IdEntity;

/**
 * 区域
 */
@Entity
@Table(name = "edb_task")
public class EdbTask extends IdEntity implements Serializable {
	
	private static final long serialVersionUID = 1L;
	
	private String customerCode;//客户编码
	private String warehouseCode;//仓库编码
	private String storageId;//库房id - 对应E店宝
	private String storageName;//库房名称 - 对应E店宝
	private String dbhost;
	private String edbUrl;//E店宝URL
	private String appkey;
	private String appsecret;
	private String token;
	private String param;//接口需要的应用级参数
	private String method;//接口名
	private String pagenum;//页码
	private String pagesize;//页大小
	private Date   startTime;//开始时间
	private Date   endTime;//结束时间
	private String intervalTime;//刷数据间隔时间
	private int sysDiffTime;//系统数据同步间隔时间
	private int threadIntervalTime; // 系统轮询间隔
	private String flag;//是否自动定时任务调用标志
	private String instanceflag;//实例标志 由哪个实例执行此任务
	private String status;//状态：0 不可用 1.可用
	private int version; // 版本标识
	
	@Version
	public int getVersion() {
		return version;
	}
	public void setVersion(int version) {
		this.version = version;
	}
	public String getDbhost() {
		return dbhost;
	}

	public void setDbhost(String dbhost) {
		this.dbhost = dbhost;
	}

	public String getStorageId() {
		return storageId;
	}

	public void setStorageId(String storageId) {
		this.storageId = storageId;
	}

	public String getStorageName() {
		return storageName;
	}

	public void setStorageName(String storageName) {
		this.storageName = storageName;
	}

	public String getPagenum() {
		return pagenum;
	}

	public void setPagenum(String pagenum) {
		this.pagenum = pagenum;
	}

	public String getPagesize() {
		return pagesize;
	}

	public void setPagesize(String pagesize) {
		this.pagesize = pagesize;
	}

	public Date getEndTime() {
		return endTime;
	}

	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getCustomerCode() {
		return customerCode;
	}

	public void setCustomerCode(String customerCode) {
		this.customerCode = customerCode;
	}

	public String getWarehouseCode() {
		return warehouseCode;
	}

	public void setWarehouseCode(String warehouseCode) {
		this.warehouseCode = warehouseCode;
	}

	public String getEdbUrl() {
		return edbUrl;
	}

	public void setEdbUrl(String edbUrl) {
		this.edbUrl = edbUrl;
	}

	public String getAppkey() {
		return appkey;
	}

	public void setAppkey(String appkey) {
		this.appkey = appkey;
	}

	public String getAppsecret() {
		return appsecret;
	}

	public void setAppsecret(String appsecret) {
		this.appsecret = appsecret;
	}

	public String getToken() {
		return token;
	}

	public void setToken(String token) {
		this.token = token;
	}

	public String getParam() {
		return param;
	}

	public void setParam(String param) {
		this.param = param;
	}

	public String getMethod() {
		return method;
	}

	public void setMethod(String method) {
		this.method = method;
	}

	public Date getStartTime() {
		return startTime;
	}

	public void setStartTime(Date startTime) {
		this.startTime = startTime;
	}

	public String getIntervalTime() {
		return intervalTime;
	}

	public void setIntervalTime(String intervalTime) {
		this.intervalTime = intervalTime;
	}

	public String getFlag() {
		return flag;
	}

	public void setFlag(String flag) {
		this.flag = flag;
	}

	public String getInstanceflag() {
		return instanceflag;
	}

	public void setInstanceflag(String instanceflag) {
		this.instanceflag = instanceflag;
	}
	public int getSysDiffTime() {
		return sysDiffTime;
	}
	public void setSysDiffTime(int sysDiffTime) {
		this.sysDiffTime = sysDiffTime;
	}
	public int getThreadIntervalTime() {
		return threadIntervalTime;
	}
	public void setThreadIntervalTime(int threadIntervalTime) {
		this.threadIntervalTime = threadIntervalTime;
	}
	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this);
	}
}